#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Created by master on 2017/2/25

s1 = "{0} is {1}"
s2 = "{key} is {value}"
l = ["alex", "2b"]
d = {"key": "alex", "value": "2b"}
result = s1.format("alex", "2b")

result2 = s1.format(*l)

result3 = s2.format(key="alex", value="sb")
result4 = s2.format(**d)

print(result4)
